package com.changgou.canal.utils;

import com.alibaba.otter.canal.protocol.CanalEntry;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/*
    Canal工具类
 */
public class CanalUtil {
    public static Map<String,String> convertToMap(List<CanalEntry.Column> columnList){
        Map<String,String> map = new HashMap<>();
        columnList.forEach(column -> map.put(column.getName(),column.getValue()));
        return map;
    }
}
